<?php


namespace app\wap\controller;

//use app\common\logic\WechatLogic;
use app\wap\logic\WechatLogic;
class Weixin
{
    public function index(){
        $config = db('wx_user')->find();
        if ($config['wait_access'] == 0) {
            ob_clean();
            exit($_GET["echostr"]);
        }
        $logic = new WechatLogic($config);
        $logic->handleMessage();
    }
}